import 'package:flutter/material.dart';

import '../components/HomeList.dart';
import '../components/HomeNav.dart';

class HomeView extends StatefulWidget {
  const HomeView({Key? key}) : super(key: key);

  @override
  _HomeViewState createState() => _HomeViewState();
}

class _HomeViewState extends State<HomeView> {
  @override
  Widget build(BuildContext context) {
    return Container(
        child: Scaffold(
      appBar: AppBar(
        title: const Text('享+社区'),
        centerTitle: true,
      ),
      body: ListView(
        scrollDirection: Axis.vertical,
        //子组件分为三部分
        children: [
          //导航组件
          const HomeNav(),
          Image.asset('assets/images/banner@2x.jpg'),
          //列表组件

          const HomeList(),
        ],
      ),
    ));
  }
}
